package ooday02zy1;

public class Teacher  extends Person{
    String salary;
    Teacher(String name,int old,String address,String salary){
        super(name,old,address);
        this.salary=salary;
    } void teach(){
        System.out.println("我叫"+name+"，我在讲课");
    }
    void sayHi(){
        System.out.println("你好我叫" + name + ",今年" + old + "岁了，我是" + address + "人..." + "我是老师");
    }

















    /*
    String salary;
    Teacher(String name,int old,String address,String salary){
        super(name,old,address);
        this.salary=salary;
    }
    void teach(){
        System.out.println("我叫"+name+"，我在讲课");
    }
    void sayHi() {
        System.out.println("你好我叫" + name + ",今年" + old + "岁了，我是" + address + "人..." + "我是老师");


        }

     */
}